import request from "@/utils/request"

// 获取订单信息
export const reqOrderList = (userName:any) => request.get<any,any>(`/orders/${userName}`)

// 确认收货
export const receiptOrder = (data:any) => request.put<any,any>('/orders',data)

// 点击立即购买
export const confirmOrder = (data:any) => request.post<any,any>('/orders/confirm',data)

// 点击购物车结算
export const tradeOrder = (data:any) => request.post<any,any>('/orders/trade',data)

// 订单提交
export const submitOrder = (data:any) => request.post<any,any>('/orders/submit',data)

// 订单支付
export const payOrder = (data:any) => request.post<any,any>('/orders/pay',data)

// 删除订单
export const deleteOrder = (orderNumber:any) => request.delete<any,any>(`/orders/${orderNumber}`)

// 取消订单
export const cancelOrder = (data:any) => request.post<any,any>('/orders/cancel',data)
